package com.github.andy0106.kersstjtl.api;

import com.github.andy0106.kersstjtl.files.File;

import java.util.ArrayList;

public class ApiTest {
    public static void main(String[] args) {
        new File("packagescache.json", "./.minecraft").create();
        ApiBuffer.setApiAddress("127.0.0.1", "8000");
        ApiBuffer.CACHE_DIR = "./.minecraft";
        ApiBuffer.load();
        ApiBuffer.get();
		ArrayList<Package> packages = ApiBuffer.getPackagesByName("ymods");
        System.out.println(packages.get(0).getPack_version());
        packages.get(0).install("./.minecraft/versions/");
    }
}
